<?php
namespace app\serverfund\validate;
use \app\manage\validate\BaseValidate;
/**
 * 资金帐户的验证类
 * @author adv30 <adv30@126.com> 2017年6月21日16:54:46
 */
class FundOptionLog extends BaseValidate
{

    protected $rule = [
        'user_ids' => ['length'=>'1,256'],
        'user_id' => ['integer', 'gt' => '0'],
        'type' => ['in'=>['init','prepaid','transfer','payment','borrow','refund','freeze','unfreeze']],
        'money' => ['in'=>'income,expend'],
        'time'=>['in'=>'threeMonthAgo,threeMonth'],
        'startTime' => ['integer'],
        'endTime' => ['integer', 'egt'=>'startTime'],
        'obj_id' => ['integer', 'gt'=>0],
        'app_id' => ['integer', 'gt'=>0],
        'action' => ['in'=>'fund,currency,integral']
    ];
    protected $message = [
        'type' => 'type不在允许的范围内'
    ];
    protected $scene = [
        'list' => ['page', 'list_rows'],
        'listByUserIds' => ['page', 'list_rows', 'user_ids'],
        'listByUserType' => ['page', 'list_rows', 'user_id', 'type', 'money', 'time'],
        'freezeOperateReason' => ['page', 'list_rows', 'type'=>['in'=>'freeze_fund,freeze_currency,freeze_integral']]
    ];
}
